/* ========================================
   공통 변수 및 기본 설정
======================================== */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.8/dist/web/static/pretendard.css");

:root {
    --card-bg: #ffffff;
    --card-border: #e1e1e1;
    --primary-color: #000000;
    --text-muted: #888888;
    --accent-bg: #f5f5f5;
    --input-border: #dddddd;
    --table-header-bg: #888888;
    --shadow-sm: 0px 0px 5px rgba(0,0,0,0.100);
    --shadow-md: 0px 0px 5px rgba(0, 0, 0, 0.100);
}

* {
    box-sizing: border-box;
}

/* ========================================
   글쓰기 페이지 (Write Skin)
======================================== */

.write-container {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 5px;
    padding: 10px 20px;
    background: #fff;
    font-family: 'Pretendard','Segoe UI', sans-serif;
}

/* 상단 헤더: 사진 + 기본 정보 */
.write-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.photo-upload-wrapper {
    width: 150px;
    flex-shrink: 0;
}

dd{
    display: block;
    margin-inline-start: 10px;
    unicode-bidi: isolate;
}

dt {
    display: block;
    unicode-bidi: isolate;
    margin-inline-start: 10px;
}

.aa {
    margin: 20px;
    font-size: 14px;
    color: #888
}

.photo-preview-box {
    width: 150px;
    height: 200px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    margin-bottom: 8px;
}

.photo-preview-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.photo-upload-text {
    color: #999;
    font-size: 12px;
    text-align: center;
    padding: 10px;
    pointer-events: none;
    z-index: 1;
}

.photo-select-btn {
    width: 60px;   
    padding: 5px;
    background: #1f1f1f;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin: 0 10px 0 5px;
}

.image-input:focus {
    outline: none;
    border-color: #888;
}

.image-input:read-only {
    background: #f5f5f5;
    color: #666;
}
.image-input[readonly] {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

.write-main-info {
    flex: 1;
}

/* 상단 메인 입력 필드 (캐릭터 이름, 서브텍스트) */
.main-input {
    width: 80%;
    padding: 12px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

.main-input:focus {
    outline: none;
    border-color: #888;
}

/* 폼 입력 필드 (드롭다운, 텍스트영역 등) */
.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    margin-bottom: 10px;
    max-width: 50%;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #888;
}

/* 속성 그리드 (나이, 신장, 출신 등) */
.attr-grid-wrapper {
   display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
    flex-direction: row;
}

.attr-field {
    display: flex;
    gap: 5px;
    margin: 2px;
    align-items: center;
    
}

.attr-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;;
}

.attr-input {
    border: 1px solid var(--input-border);
    width: 70px;
    font-size: 13px;
}

.attr-input:focus {
    outline: none;
    border-color: #888;
}

.attr-input::placeholder {
    color: #ccc;
}

/* 프로필 서식 선택 섹션 */
.form-select-section {
    background: var(--accent-bg);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.form-select-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

/* 서식별 폼 옵션 */
.form-option {
    display: none;
    margin-top: 20px;
    padding: 20px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: #fff;
}

.form-option.active {
    display: block;
}

/* COC 스탯 테이블 */
.coc-stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.coc-stats-table td {
    padding: 8px;
    border: 1px solid #ccc;
    background: #f9f9f9;
}

.coc-stats-table td.stat-label {
    background: #e8e8e8;
    font-weight: 600;
    text-align: center;
    width: 80px;
}

.coc-stats-table input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
}

.coc-stats-table input:focus {
    outline: none;
    border-color: #888;
}

/* COC 상세 필드 */
.coc-detail-field {
    margin-bottom: 15px;
}

.coc-detail-label {
    display: block;
    background: var(--table-header-bg);
    color: #fff;
    padding: 10px 12px;
    font-weight: 600;
    margin-bottom: 0;
    border-radius: 4px 4px 0 0;
    font-size: 14px;
}

.coc-detail-textarea {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 0 0 4px 4px;
    min-height: 100px;
    resize: vertical;
    box-sizing: border-box;
    font-size: 12px;
    line-height: 1.5;
}

.coc-detail-textarea:focus {
    outline: none;
    border-color: #888;
}

/* 기본 서식용 큰 텍스트 영역 */
.large-textarea {
    width: 100%;
    min-height: 150px;
    padding: 5px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    resize: vertical;
    box-sizing: border-box;
    font-size: 12px;
    line-height: 1.5;
}

.large-textarea:focus {
    outline: none;
    border-color: #888;
}

.field-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* 자유 입력 라벨 입력 필드 */
.field-label-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    box-sizing: border-box;
    background: #fafafa;
    transition: all 0.2s;
}

.field-label-input:focus {
    outline: none;
    border-color: #888;
    background: #fff;
}

.field-label-input::placeholder {
    color: #aaa;
    font-weight: 400;
}

.text-field-group {
    margin-bottom: 20px;
    color:black;
}



/* ========================================
   버튼 영역 (글쓰기 버튼)
======================================== */

.board-action-area {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    padding: 0 10px;
}

.btn-write-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--primary-color);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-write-custom:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.btn-write-custom .material-symbols-outlined {
    font-size: 20px;
}

.co {
    position: relative;
    display: flex;
    align-items: center;
    color: #333;}
